On the other hand, variables declared within a function body have block scope and do not conflict with variables having the same names but which are declared in other functions. It is generally regarded as good practice to avoid declaring variables with file scope, to prevent confusion with like-named variables having block scope and to clarify the relationships among functions. Rather, variables which are used by more than one function should be passed as function arguments wherever practical.
Unless declared 'static' (discussed later), an identifier with file scope is also available from within other source files, although it should be redeclared in each as discussed below. Header files* are commonly used for the purpose of listing declarations of those identifiers which will be used in several source files.
Think C and C++ add a third scope - CLASS - applying to the instance variables of a user-defined class, as discussed in Chapter 4.
Before discussing storage classes, we should distinguish between the terms DECLARATION and DEFINITION as used in this document. A definition is something which describes the structure of or allocates space for something, whereas a